package log_server

import (
	"gitee.com/justin0218/store/protos/log_server/proto"
	"google.golang.org/grpc"
	"net"
)

func GrpcServer(srv proto.LogServer) {
	lis, err := net.Listen("tcp", ":50008")
	if err != nil {
		panic(err)
	}
	var opts []grpc.ServerOption
	svr := grpc.NewServer(opts...)
	proto.RegisterLogServer(svr, srv)
	err = svr.Serve(lis)
	if err != nil {
		panic(err)
	}
}
